Skip to content

test(audit): remove low-value tests across the suite, 140 fewer tests - #849

Merged
V3RON merged 2 commits into
mainfrom
chore/test-roi-cleanup
Oct 21, 2026
Merged

V3RON merged 2 commits into
mainfrom
chore/test-roi-cleanup

Conversation

@V3RON

@V3RON V3RON commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Removes tests that cost upkeep but add no protection: each one is a duplicate, is covered by a bigger test, sits below a seam a surface test already proves, checks only an undocumented log line, or checks a constant or a fake's own behaviour.

How: Haiku scanned all 404 test files (184k lines, commit 7b5b4d9) and found 430 candidates. Sonnet checked the 265 removal, merge and table candidates. For each one it opened the test said to cover it and compared the assertions. It kept 61. The other 204 were applied by Sonnet: 136 deletes, 46 tables, 19 merges, 3 title narrowings. Weak-assertion rewrites (165 candidates) were left for another run.

Result: 98 test files changed, about 2,800 fewer lines, and 140 fewer tests. Four files are gone: e2e/fake-driver/device-data, core/warm-pool/boundary (the depcruise past-index rule enforces the same thing), and gateway/routing/stages/free-slot and ram-budget (their cases are covered at the coordinator).

Every assertion that moved into a kept test was proven by breaking the source and watching it fail, except two that appliers say are not isolated: session.test.ts wakes and server.test.ts installComponent on the no-flag row.

Checks: all 86 changed unit files pass together (4828 passed, 3 skipped). The 6 changed fast e2e files pass. Pre-commit hooks pass (format, lint, typecheck, comments, boundaries). The two slow-lane files (slow-ios-physical, slow-agent-device-gateway) lost deletions only and were not run.

Also: drops the two gateway-front.test.ts 2 GiB download tests (120 s budget, flaky as #807). edge.test.ts and host/download-cap.test.ts still prove the 2 GiB limit.

Rejected by verifiers (KEEP, 61): LOG 15, LOW-ROI 14, DUP 9, TABLE 9, BELOW-SEAM 8, SUBSUMED 4, INTERNAL 2.

Test counts per file
## I
ports/paths 29->28, process-runner 40->38, stream/feed 7->5, framing 9->8, host-load 63->62 (2 tables), logger 15->14, parent-watch 6->5, ui events 15->13, ui workers 2->1, ui inbox 8->8 (table). bugs none. refs none.
## D2
observer 3->1, driver-catalog 23->23 (table), driver 16->15, fake-driver 31->24, physical-enrollment 26->25 (merge, proven by removing claim.release), quarantine 60->58, reaper 14->13, reclaim 37->36, startup-converger 8->7, startup-read 7->5, warm-pool/boundary.test.ts removed (depcruise past-index rule), converger 104->103 (+1 FIX title narrowed). NOTE: reclaim-coordinator 2 failures reported on HEAD copy too (attemptedStrategy delete vs wipe) — recheck at end.
## G
aggregate 50->49, gateway dispatcher 81->81 (table), fleet-coordinator 237->236 (+both-full case merged in), lease-index 27->26 (+1 FIX retitle), routing 28->27, free-slot.test.ts (3) and ram-budget.test.ts (3) removed, service 65->60, worker-registry 65->63. bugs none.
## D1
component-installer 86->84, config 241->238 (several tables), device-operation-claims 6->5, device-provisioner 19->19 (tables), doctor 92->87, domain 77->77 (merge+fix). Each added assertion proven by a source break. bugs none.
## A
event-history 10->9 (merge), fake-driver/device-data.test.ts (2) removed, physical-enrollment 31->30, physical-leasing 35->35 (table), physical-presence-loss-recovery 12->12 (+attemptedStrategy), physical-reclaim 9->8, startup-reconcile 12->12 (table), slow-agent-device-gateway -1, slow-ios-physical -2 (not run). 6 fast e2e files pass (106 tests). The reclaim failures D2 saw = A's temporary attemptedStrategy break.
## C
simlock-client 42->42 (table), cli/index 358->355 (+4 tables), contract errors 60->59, operations 239->238, protocol 8->7, schemas 75->74, merge-pr 27->27 (table). bugs none.
## F
adb-server 26->25, device-profile-source 77->72, android index 291->290, physical-handler 126->124, prerequisites 11->11 (table), screen/session 41->40, installer-process 6->5, ios index 184->178, ios physical 116->114, screen-capture 24->24 (merge), slim-labels 13->11. bugs none. Note: session.test.ts merged `wakes` assertion not isolated red (test fails earlier at open step).
## H
conformance 10->6, app 158->156 (table), auth 8->3, http errors 16->15, http server 13->11, tracker 33->32 (table), create-leasing 165->162 (merge), lease-acquisition-coordinator 166->165, lease-end-participants 42->41, lease-lifecycle 7->6, mcp main 18->17 (merge), mcp server 18->16 (table), mcp session 44->43. bugs none.
## B
definition 12->11, edge 213->211, allocate 7->6, context 2->1, relay-host-link 19->15, renewals 2->1, gateway 3->2, supervisor 90->89, upstream 4->3, admin-secret 6->5, proxy 27->26 (merge), bus 15->13 (table). bugs none.
Applied verdicts (204)
MERGE  e2e/event-history.test.ts:144  Everything else (stopped-run history, grant present, socket absent) is asserted in :62; only the status JSON is new.
DELETE e2e/fake-driver/device-data.test.ts:1  Tests only the e2e fake's own table; every daemon e2e run and restart writes and reads it, so a break fails them.
DELETE e2e/physical-enrollment.test.ts:485  The device remove test above runs env.cli with no --yes, asserts exit 0 and state deleted; identical assertions.
TABLE  e2e/physical-leasing.test.ts:275  Four tests share one shape: accept an os, release, refuse a near os; differ only in data and expected message.
MERGE  e2e/physical-reclaim.test.ts:224  Same setup and claim (reclaim fails while present, ends quarantined); presence test lacks only the attemptedStrategy uninstall check.
DELETE e2e/slow-agent-device-gateway.test.ts:237  Same open, install, open, screenshot to a fresh path and PNG magic check as :210; only extras are a trivial missing-file check and length>8.
DELETE e2e/slow-ios-physical.test.ts:322  Unit expectRefused proves refusal with zero spawned processes per host-path option; e2e/device-exec.test.ts:215-238 proves 422 PASSTHROUGH_REFUSED.
DELETE e2e/slow-ios-physical.test.ts:382  Real driver maps a physical device to SIMLOCK_DEVICE_UDID at ios/index.test.ts:1699; fast lane physical-leasing:359 proves the grant carries it.
TABLE  e2e/startup-reconcile.test.ts:120  Bodies identical except scripted runState; :120 asserts a subset of :104.
DELETE src/agent-device/definition.test.ts:35  loadWith registers the module under agentDeviceModule.name and section() reads the literal 'agent-device'; a rename fails every following test.
DELETE src/agent-device/edge.test.ts:2944  The POST /rpcx row of the refusal table asserts the same 404 and exact error body, plus nothing reaches agent-device.
DELETE src/agent-device/edge.test.ts:3729  The 'running' toEqual in :3719 already pins the exact entry and rejects a defined reason; only an undefined reason key differs, invisible over JSON.
TABLE  src/agent-device/edge.test.ts:3837  Bodies identical except contentLength mode.
DELETE src/agent-device/front/allocate.test.ts:126  Spy on refresh count is internal; edge:1815 proves it: heartbeat only skips agent-device when allocate's refresh ended the unlisted entry. Refresh logic is in front-map.test.
DELETE src/agent-device/front/context.test.ts:35  Asserts absence of a log line only; no user doc describes it and it is not LOG-SAFETY. Success reading is covered by every edge test.
DELETE src/agent-device/front/relay-host-link.test.ts:101  gateway-front:853 and :970 assert the worker daemon receives tenant gw.<instance>.<principal> with _ written _5f_, built by an independent formula.
DELETE src/agent-device/front/relay-host-link.test.ts:122  gateway-front:1480 sends GET /artifacts/a.png and GET /artifacts with no header, asserts the too-old refusal and that no member received a request.
DELETE src/agent-device/front/relay-host-link.test.ts:185  Surface test relays at 119 s and refuses 403 at 121 s after release --all; timer count is internal state, and the dispose test stays.
DELETE src/agent-device/front/relay-host-link.test.ts:242  Surface test straddles the window: workerUnreachable() at 59 s on every route, refusal after 60 s; the status state is not itself visible.
DELETE src/agent-device/front/renewals.test.ts:34  Asserts internal timer counts; edge:1836 proves renewals stop for an ended lease with a running command (no lease.renew or lease.list after 120 s).
DELETE src/agent-device/gateway.test.ts:67  Gateway-front rig starts a real gateway daemon whose mount and beforeDrain are used; the 1204 test goes red without beforeDrain.
DELETE src/agent-device/host/agent-device-supervisor.test.ts:1416  Log absence, undocumented; off state after stop is asserted by the preceding test at 1400.
DELETE src/agent-device/host/upstream.test.ts:122  Adapter passes the reason through; main.test.ts:3135 proves the found/need message reaches doctor via the real adapter.
DELETE src/auth/admin-secret.test.ts:29  MemoryFilesystem stores options.mode, so line 11's stat check on 0600 fails if the call omits mode.
MERGE  src/auth/proxy.test.ts:246  Capitalised configured Authorization is not covered at 218 or 235 (they use lowercase and a cf header).
TABLE  src/bus/index.test.ts:280  Three one-case it.each blocks differing only in the initiator name.
TABLE  src/cli/index.test.ts:2643  Same claim, different rejected key.
DELETE src/cli/index.test.ts:3223  3041 asserts the (custom) suffix on a custom model and none on built-in ones; catalog.ts:49 has no platform branch.
DELETE src/cli/index.test.ts:4790  4301 first row asserts the exact status output including 'Daemon: running (worker)'; this one only reads the fake's default.
TABLE  src/cli/index.test.ts:5245  Same shape, one flag maps to one input field.
TABLE  src/cli/index.test.ts:7763  Same sentFor helper and assertion shape over three arg lists.
TABLE  src/cli/index.test.ts:8276  Same outcome, only --csv differs.
DELETE src/contract/errors.test.ts:116  CODES_WITH_DECLARED_DETAILS is built from a Record<CodeWithDeclaredDetails, true> (errors.ts:172), so tsc enforces membership both ways.
DELETE src/contract/operations.test.ts:1590  relay.request's channel is relayChannelSchema (operations.ts:1025); 1580 asserts 32, 33, empty and space through it.
DELETE src/contract/protocol.test.ts:50  Hand-maintained literal; protocol-bump-check enforces bumps in hook and CI; no doc cites 52; title claim never checked.
DELETE src/contract/schemas.test.ts:684  worker-view.test.ts:91 parses via the same statusDeviceSchema (worker-view.ts:99), checks all three reasons exactly and refuses unplugged.
DELETE src/core/capacity/observer.test.ts:31  create-leasing.test.ts:2500 asserts no capacity.changed after commits before start, and exactly one after.
DELETE src/core/capacity/observer.test.ts:41  Leasing 2571 (unchanged figures emit nothing), 2512 (change emits) and 2587 (no consecutive equal) cover the dedupe.
TABLE  src/core/component-installer.test.ts:424  Same claim over three progress lists; keep failed and already-installed tests separate.
TABLE  src/core/component-installer.test.ts:432  Same claim over three progress lists.
MERGE  src/core/component-installer.test.ts:1479  1495 proves error, message and no removal for 26.5, but not that the record is kept; 1479 asserts that.
MERGE  src/core/component-installer.test.ts:1864  Same claimProvision setup; only the dry-run refusal is new.
MERGE  src/core/config.test.ts:211  Defaults equal lines 117-120 of the defaults test; only the schema round trip is unique.
TABLE  src/core/config.test.ts:459  Same shape as table rows; 0 is a distinct edge row beside 1.5 and missing.
TABLE  src/core/config.test.ts:476  Table has a missing platform but no unknown value; same rejection shape, only data differs.
TABLE  src/core/config.test.ts:956  All three go through the generic objectValidator; differ only in key path.
TABLE  src/core/config.test.ts:1195  Same generic objectValidator warning; differs only in key path.
MERGE  src/core/config.test.ts:1330  Same input and list as the ios phone row; only the no-other-keys check is unique.
TABLE  src/core/config.test.ts:1378  Both platforms use one defaultModelsValidator; only platform and data differ.
DELETE src/core/config.test.ts:1535  Only assertion is capacity.strategy resource with no file, identical to line 70 and the defaults test.
DELETE src/core/config.test.ts:1894  Identical load and warn assertion at lines 1859-1864.
DELETE src/core/device-operation-claims.test.ts:6  Exclusivity, operationFor and isClaimed true are each asserted by kept tests.
TABLE  src/core/device-provisioner.test.ts:408  Same flow and assertions; differs only in imageTag.
TABLE  src/core/device-provisioner.test.ts:423  Same flow; differs only in the spec's imageTag.
MERGE  src/core/doctor.test.ts:836  906 asserts silence at 9000 and the exact finding at 9001 on the same estimates; no-driver stall case is unproven elsewhere.
DELETE src/core/doctor.test.ts:873  Claim exemption is state-independent in isStalledTransition; 1016 proves hold and release.
DELETE src/core/doctor.test.ts:975  Same fixture and same finding object; 906 is strictly stronger.
DELETE src/core/doctor.test.ts:1074  Silence at 8000 is implied by silence at the stricter 9000 boundary.
DELETE src/core/doctor.test.ts:1745  Listing is proven by its outcome in every no-read reconcile; only a call record is lost.
DELETE src/core/doctor.test.ts:2612  prerequisites defaults to false (doctor.ts:198); the explicit false is the same call.
MERGE  src/core/domain.test.ts:327  Physical ready/reclaiming -> shutdown and -> provisioning are in the 297 loop; virtual rows in table at 35.
FIX    src/core/domain.test.ts:573  The 297 loop already asserts quarantined -> absent throws; the other assertions here are unique.
TABLE  src/core/driver-catalog.test.ts:398  Same helper and assertion shape; the three skip cases differ only in fixture data.
DELETE src/core/driver.test.ts:22  Line 48 makes the same 6 GiB reservation on 10 GiB, awaits it and calls the returned release, which throws if it is not a function.
TABLE  src/core/driver.test.ts:334  Same call and assertion, differing only in list data.
DELETE src/core/fake-driver.test.ts:29  Echo of an option. driver-catalog.test.ts:203 routes simctl and devicectl through passthroughTools and goes red if the fake stops exposing them.
DELETE src/core/fake-driver.test.ts:235  Type annotation is tsc's. The asserted defaults (/fake/ios, empty environment) appear in no other test and no suite reads the literal.
DELETE src/core/fake-driver.test.ts:243  Echoes options. doctor.test.ts:2235 asserts the deviceRoot option in a payload; lease-acquisition-coordinator and daemon main tests assert leaseEnvironment.
DELETE src/core/fake-driver.test.ts:257  Echo of the leaseEnvironment option; no caller outside the real drivers uses virtualLeaseEnvironment, and the real drivers have their own tests.
DELETE src/core/fake-driver.test.ts:270  setManagedReality is used by 63 other tests that assert results read through listManaged; a break goes red there.
DELETE src/core/fake-driver.test.ts:405  driver-catalog.test.ts feeds modelClasses and asserts classDefaults; default catalogs at 97-149 assert empty modelClasses.
DELETE src/core/fake-driver.test.ts:431  dispatcher.test.ts:2136 feeds customModels through the fake and asserts them in catalog.get; the fake itself is only an echo.
MERGE  src/core/physical-enrollment.test.ts:534  Hold is proven by DEVICE_BUSY at 253, but 253 never checks the claim is freed afterwards.
DELETE src/core/quarantine-coordinator.test.ts:522  Log text only; no user doc describes the line and it is not LOG-SAFETY. Nobody sees the difference but the log (rule 8).
DELETE src/core/quarantine-coordinator.test.ts:1310  Log text only, no user doc. 1327 keeps the behaviour, and physical-presence.test.ts:54 keeps rejection propagation.
DELETE src/core/reaper.test.ts:504  Log count only; no user doc describes the line. 473 keeps the event-triggered failure caught and logged.
DELETE src/core/reclaim-coordinator.test.ts:844  Log text only, no user doc. Line 768 asserts the same rejected read commits absent with not-present.
DELETE src/core/startup-converger.test.ts:99  Line 236 asserts the full ordered call list: quarantine-restore, once, before recover of the reclaiming device.
DELETE src/core/startup-read.test.ts:99  Log text only; no user doc describes it and it is not LOG-SAFETY. Unreadable outcome is proven at 48.
DELETE src/core/startup-read.test.ts:118  Log text only; no user doc. The unreadable outcome and the 60 s limit are proven at 63.
DELETE src/core/warm-pool/boundary.test.ts:17  Same past-index rule depcruise enforces in lint, over a component found by index.ts; test re-scans only src.
FIX    src/core/warm-pool/converger.test.ts:1316  Log line undocumented; targets() output and no-create are the claim. Runtime-missing row is not in the 1357 table.
DELETE src/core/warm-pool/converger.test.ts:1833  Only log lines asserted; no user doc describes the target-short line; not a destructive action.
DELETE src/daemon/connection-host.test.ts:33  Server test starts over a stale socket file and serves a client on it; same claim at the surface.
DELETE src/daemon/connection-host.test.ts:98  Log text only; no user doc describes it; the recovery log test also asserts the Claimed line.
DELETE src/daemon/dispatch.test.ts:46  Write operation line is not described by user docs; read-fail and INTERNAL log tests keep the level logic.
TABLE  src/daemon/dispatcher.test.ts:991  Both: lease.request naming owner is FORBIDDEN; rows differ only in session (agent, plain admin).
DELETE src/daemon/dispatcher.test.ts:1446  Handler returns options.config unchanged; asserts the test's own literal. Output schema covered elsewhere.
DELETE src/daemon/dispatcher.test.ts:1459  One-field pass-through of the test's own config literal.
DELETE src/daemon/dispatcher.test.ts:3313  3490 asserts class, PASSTHROUGH_REFUSED code and no spawn for device.exec; the verb match is the fake's own.
DELETE src/daemon/error-code.test.ts:66  Dispatcher test proves LEASE_ID_TAKEN with details through the same classifier at the invoker's seam.
DELETE src/daemon/error-code.test.ts:72  Wire test proves ADMIN_AUTHENTICATION_FAILED from this error class on a wrong credential.
DELETE src/daemon/gateway-uplink.test.ts:280  Dial token is asserted at 68, the memory transport at ports tests, and the join over a real socket in the e2e.
DELETE src/daemon/main.test.ts:455  Log record only; no user doc describes it; the gateway.token redaction tests assert the record exists.
DELETE src/daemon/main.test.ts:1880  Log line only; event payload test at 1859 proves the refusal; undocumented, not a destructive action.
MERGE  src/daemon/main.test.ts:3064  Same status.get assertion and setup as the loop; the old-key config is one more row.
DELETE src/daemon/relay-gateway.e2e.test.ts:685  704 holds 64 relays, asserts 64 started before release; a lower or higher limit fails it.
DELETE src/daemon/relay-worker.e2e.test.ts:490  INTERNAL for 101 headers is a failures-table row; the log text is undocumented.
DELETE src/daemon/relay-worker.e2e.test.ts:508  INTERNAL for a throwing target is a failures-table row; the log text is undocumented.
TABLE  src/daemon/server.test.ts:250  Same PROTOCOL_VERSION_UNSUPPORTED answer; only the version differs.
TABLE  src/daemon/server.test.ts:1258  Both emit facts for unknown leases then check status.get ok; rows differ only in event names.
DELETE src/daemon/server.test.ts:2216  1029 asserts leases stay in the registry and no lease.released after a daemon stop, plus the database row.
DELETE src/daemon/server.test.ts:2273  Log text only; no user doc describes it; the redaction test asserts the Daemon started record.
DELETE src/daemon/server.test.ts:2293  Log text only; no user doc describes it; 'Connection closed' also serves as a receipt in another test.
DELETE src/daemon/server.test.ts:2464  Log text only; no user doc describes the shutdown lines; not a destructive action.
DELETE src/daemon/server.test.ts:2491  Log level only; DOCTOR_UNAVAILABLE on the wire is asserted at 2920 and dispatch.test.ts covers info-level handled errors.
DELETE src/daemon/server.test.ts:2512  Log level only; UNKNOWN_LEASE on the wire is asserted at 1108 and dispatch.test.ts covers the level.
TABLE  src/daemon/server.test.ts:2643  Both: never policy gives RUNTIME_MISSING with the policy suffix; rows differ only in allowDownload true or absent.
DELETE src/drivers/android/adb-server.test.ts:35  Create-seam test asserts same occupied refusal (listening, no record) via same record===undefined branch; dead-record test at :44 also stays. Drop stale comment mention.
TABLE  src/drivers/android/device-profile-source.test.ts:297  Row repeats the 511 KiB row at :260, which asserts ramSize undefined. Other rows differ.
DELETE src/drivers/android/device-profile-source.test.ts:545  671 has same case-only clash, asserts models ['Pixel 8'] and customModels [].
DELETE src/drivers/android/device-profile-source.test.ts:595  557 same fixture, asserts customModels exactly ['My Custom Phone'].
DELETE src/drivers/android/device-profile-source.test.ts:631  557 exact catalog has Pixel 8 in models and customModels only the custom one.
DELETE src/drivers/android/device-profile-source.test.ts:868  557 asserts identical modelClasses map for the same untagged Pixel 8 and devices.xml fixture.
DELETE src/drivers/android/index.test.ts:4881  toEqual on whole defaultModels at 4868 fails on any extra key; undefined-valued key is invisible on the wire.
TABLE  src/drivers/android/index.test.ts:5521  Same message shape, differs only in data; one table covers both.
MERGE  src/drivers/android/physical-handler.test.ts:835  Same fresh-driver 40-reply setup as 780; only extra is no adb commands run. Move it, drop this test.
TABLE  src/drivers/android/physical-handler.test.ts:1189  Bad line (space, ';') is covered by 1257 rows with same rejects and no-uninstall assertions.
TABLE  src/drivers/android/prerequisites.test.ts:89  Identical steps and assertions; only missing tool and remedy differ.
MERGE  src/drivers/android/screen/session.test.ts:720  Phone half equals Awake row at 735 (wakes []). Emulator with Asleep power asserting no wake is unique.
DELETE src/drivers/installer-process.test.ts:46  Same stdout and [10,20,30]; 91 asserts it while the process still hangs, which is stronger.
DELETE src/drivers/ios/index.test.ts:431  420 asserts component, downloadable, osVersion, which DriverCrashError lacks; same setup.
DELETE src/drivers/ios/index.test.ts:1268  1253 asserts iPhone 8 modelRuntimes [] exactly; 1277 asserts models equal list including iPhone 8.
DELETE src/drivers/ios/index.test.ts:1314  1277 loop resolves iPad mini at 26.0 with same toEqual on same fixture (two 26.0 builds).
DELETE src/drivers/ios/index.test.ts:1681  Single assertion repeated verbatim at 1694.
MERGE  src/drivers/ios/index.test.ts:1703  Virtual erase for standard already asserted at 1165-1166; physical lines are unique.
TABLE  src/drivers/ios/index.test.ts:2421  Same steps and claim as 2388 for another runtime; the two versions make 'too old' proven by two cases.
DELETE src/drivers/ios/index.test.ts:2590  Identical data, script and expectations as 2266; no rejected-label history appears in the body.
TABLE  src/drivers/ios/index.test.ts:3936  Same steps and assertion on residue; differs only in count, singular text.
DELETE src/drivers/ios/index.test.ts:4514  toEqual on whole defaultModels at 4492 fails on any extra key.
DELETE src/drivers/ios/physical.test.ts:956  Table at 491 asserts the exact argv of all three devicectl calls with toEqual; this verb-prefix check is a strict subset.
DELETE src/drivers/ios/physical.test.ts:1303  PHONE default already has tunnelState disconnected; 1108 asserts present, exit-1 row of the 1245 table asserts not-present.
MERGE  src/drivers/ios/screen-capture.test.ts:241  Second half repeats the exact unavailable() reason that 251 asserts; unavailable() ignores the device program.
DELETE src/drivers/ios/slim-labels.test.ts:76  index.test.ts pins literal v1:<16 hex> signatures that the idempotence test needs slimSignature to reproduce exactly; prefix and format break it.
DELETE src/drivers/ios/slim-labels.test.ts:80  Re-slim test at index.test.ts:2346 needs widgets and search sets to give different signatures; a signature ignoring the set would fail it.
DELETE src/gateway/aggregate.test.ts:89  dispatcher.test.ts:483 asserts the same gateway host with tools [] and the worker's own host through status.get.
MERGE  src/gateway/aggregate.test.ts:828  871 proves the modelClasses sort-order cut with reversed arrival; 828's modelClasses lines repeat it.
TABLE  src/gateway/dispatcher.test.ts:1699  Same FORBIDDEN claim and setup; only session and owner differ. Not a fix-commit test.
DELETE src/gateway/fleet-coordinator.test.ts:4400  Table row at 1433 sends DAEMON_STOPPING and asserts DispatchError, WORKER_UNREACHABLE and details; this is the same through the same path.
DELETE src/gateway/lease-index.test.ts:303  Only asserts no warning for an ordinary add; resurrection log is described in no user doc and is not a safety log.
FIX    src/gateway/lease-index.test.ts:417  Test also asserts all() length 1 across snapshots; the once-only log count is undocumented, so narrow rather than delete.
DELETE src/gateway/routing.test.ts:414  Export-name check is meta; not.toBe passes on undefined; warm-hit physical pick is proved by routing.test.ts:302 and 320.
DELETE src/gateway/routing/stages/free-slot.test.ts:23  Keep half repeats line 38; undefined-capacity branch is unreachable since takes-requests drops that worker first.
MERGE  src/gateway/routing/stages/free-slot.test.ts:35  Platform reason is proved at 4484; only the precedence when global is also full is unproven elsewhere.
DELETE src/gateway/routing/stages/free-slot.test.ts:45  Global reason is listed via coordinator 4498; routing.test.ts:220-248 keeps platform and global held by unleased warm devices.
DELETE src/gateway/routing/stages/ram-budget.test.ts:24  routing.test.ts:187-204 proves at-budget pass-over, under-budget pick and sole-worker ask; unread capacity never reaches this stage.
DELETE src/gateway/routing/stages/ram-budget.test.ts:33  routing.test.ts:199-203 asserts stage ram-budget with the winning worker for the same at-budget case through select.
DELETE src/gateway/routing/stages/ram-budget.test.ts:45  Coordinator test 4626-4642 asserts full with ram-budget in the listing; zeroReason is only consulted for a worker scored zero.
DELETE src/gateway/service.test.ts:584  Test at 634 compares the whole relayed envelope: module, event and payload plus workerId. Ring-buffer clause is never asserted.
DELETE src/gateway/service.test.ts:608  634 asserts id and timestamp equal the sent ones (777) and payload.workerId, through the same relay.
TABLE  src/gateway/service.test.ts:717  Same claim and flow as 688; only event name and payload differ. Not a fix-commit test.
DELETE src/gateway/service.test.ts:1142  The full-view literal at 362 asserts downloads {policy, timeoutMs: 45 min} with the same worker value.
DELETE src/gateway/service.test.ts:1263  1310 uses the same previous version and asserts connection, protocol ranges, calls and subscribed; extra is a toBe(52) pin.
DELETE src/gateway/service.test.ts:1528  Only asserts log wording of a timed-out subscription; no user doc describes it and it is not a safety log.
DELETE src/gateway/worker-registry.test.ts:391  service.test.ts:1759 drives both reasons through GatewayService and asserts empty views and the worker.rejected reason.
DELETE src/history/projections/conformance.test.ts:157  Duplicate-id dedupe happens in the history writer before any projection; history.test.ts:315 asserts no second apply and one stored row.
DELETE src/history/projections/conformance.test.ts:254  history.test.ts:331 asserts rollback of projection rows and event row, writing false, one error; wrapper adds no projection case.
TABLE  src/http/app.test.ts:631  Differ only in field and value.
TABLE  src/http/app.test.ts:668  Differ only in field and value.
TABLE  src/http/app.test.ts:675  Differ only in field and value.
DELETE src/http/app.test.ts:2233  Both routes use the shared errorResponse; 2107 asserts 422 with oldestTs and 503 HISTORY_UNAVAILABLE.
DELETE src/http/app.test.ts:2423  Fake handler throws FORBIDDEN, proving only the shared 403 mapping that app.test.ts:250 asserts with code.
DELETE src/http/auth.test.ts:38  Outcome comes from fakeAuth; real no-header 401 is src/auth/auth.test.ts:76 and the 401 body shape is asserted at 134.
DELETE src/http/auth.test.ts:46  Malformed-header parsing is fakeAuth's; the real table (Basic, empty Bearer, lowercase) is src/auth/auth.test.ts:76-81.
DELETE src/http/auth.test.ts:53  Unknown token 401 with its exact body is asserted at 134 against real createAuth.
DELETE src/http/auth.test.ts:60  app.test.ts:213 reads principal, name, role, via of a labelled agent token through /v1/identity.
DELETE src/http/auth.test.ts:69  app.test.ts:260 admits an operator token on an admin-only route with 200 through the full app.
DELETE src/http/errors.test.ts:178  app.test.ts:702 asserts the same exact REQUESTER_ALREADY_LEASED body with existingLeaseId through errorResponse.
DELETE src/http/server.test.ts:190  Only asserts request-log lines; user docs do not describe the request log, not a safety log (rule 8).
DELETE src/http/server.test.ts:234  Asserts a warning's text and count, undescribed in user docs; the 404 on an unbuilt console is asserted at 206.
DELETE src/http/tracker.test.ts:134  app.test.ts:742 asserts 201, one lease.request dispatch and the same request id for a repeated key.
TABLE  src/http/tracker.test.ts:385  Differ only in field; omit half is unique to tracker tests.
TABLE  src/http/tracker.test.ts:397  Differ only in field; omit half is unique to tracker tests.
DELETE src/leasing/create-leasing.test.ts:562  Event payload is asserted at 599; the rest is log absence, undescribed in user docs (rule 8).
DELETE src/leasing/create-leasing.test.ts:1216  Test at 1047 asserts the same holder-then-noWait NoCapacityError on the same default harness; a hang fails either by timeout.
MERGE  src/leasing/create-leasing.test.ts:1325  Refusal half is asserted at 3970 with exact message; release-then-grant exists nowhere else.
DELETE src/leasing/lease-acquisition-coordinator.test.ts:3031  Identical setup to :3004, which asserts the same UnknownModelError rejection plus the waiting-demand claim; nothing unique.
DELETE src/leasing/lease-end-participants.test.ts:874  Log-only; docs describe endWaitMs, not the warning, and nuke not waiting is asserted at :857. Not LOG-SAFETY.
DELETE src/leasing/lease-lifecycle.test.ts:102  create-leasing:1307 asserts ttlMs and ttlDeadline for a request ttl against a different default, through engine.request; same claim.
DELETE src/mcp/main.test.ts:260  The :276 row with CLAUDE_CODE_SESSION_ID abc asserts cli id equals literal claude-code:abc and principal equals it; same env, same claim.
MERGE  src/mcp/main.test.ts:297  Same closes-once assertions as the table; only the stdin listener cleanup is extra and moves with it.
TABLE  src/mcp/server.test.ts:149  The :74 test compares against the code's own schema keys, so it proves none of these literals; keep the claims, merge three identical setups.
TABLE  src/mcp/server.test.ts:162  Same as :149: published-surface literal not proved by the schema-derived key equality at :74.
TABLE  src/mcp/server.test.ts:175  Same as :149: published-surface literal not proved by the schema-derived key equality at :74.
DELETE src/mcp/session.test.ts:62  Smoke test stubs release to return {leaseId} and asserts structuredContent equals {leaseId, released: true} through the same session.release.
TABLE  src/merge-pr.test.ts:379  Three cases differ only in the run data and assert the same two things; each spawns the script.
TABLE  src/ports/host-load.test.ts:385  Differs from :379 only in data (a different period).
TABLE  src/ports/host-load.test.ts:648  Same accepted-then-broken shape and same two assertions as the table; only the cgroup input differs.
DELETE src/ports/host-load.test.ts:728  Same probe, same four assertions against the real /proc and /sys as :809, which also restores mocks and runs on Linux.
DELETE src/ports/logger.test.ts:75  child() joins parent and name the same at every depth; :84 asserts the dot-join from root daemon through two levels.
DELETE src/ports/parent-watch.test.ts:46  Tests only the fake's own guard; the sole other user is a cli test, and no production code is proved.
DELETE src/ports/paths.test.ts:89  resolveDaemonHome calls daemonDataDirectory; the :98 table asserts the same two dataDirectory literals for both roles.
DELETE src/ports/process-runner.test.ts:98  The kept :824 table replays stdoutLines through handle.stdout and asserts the lines; nothing extra here.
DELETE src/ports/process-runner.test.ts:622  Pins three constants only; no user doc or ADR states them, not a fix-commit test, and a changed default shows in the diff.
TABLE  src/simlock-client/client.test.ts:184  Identical connect, call, assert payload, reply, assert answer shape; differs only in role, operation and data.
TABLE  src/simlock-client/client.test.ts:213  Same pass-through shape as the other two members; only operation, payload and answer differ.
TABLE  src/simlock-client/client.test.ts:230  Same pass-through shape; only the connect function, operation and data differ.
DELETE src/stream/feed.test.ts:38  Link test advances the start bound, asserts 503 STREAM_UNAVAILABLE and closes===1 through readScreenFeed; only the message text is lost.
DELETE src/stream/feed.test.ts:56  create.test:65 straddles the bound (29999/30000), asserts the body read fails and closes===1; only the message text is lost.
DELETE src/stream/framing.test.ts:34  Line 31 toEqual on the whole frame bytes implies equal byteLength; same push path in the scanner.
DELETE ui/src/model/events.test.ts:52  Same seqs 2,9,5 at one timestamp expecting 9,5,2, through the feed that calls mergeEvents.
DELETE ui/src/model/events.test.ts:65  Feed test sends an already-shown event, asserts snapshot identity and zero notifications, which needs mergeEvents to return the held array.
DELETE ui/src/model/workers.test.ts:17  Page test asserts two refused identical targets give two distinct row keys; the sibling workers test still pins the key format.
TABLE  ui/src/state/inbox.test.ts:90  Two tests differ only in which read fails and which field is asserted; leases behaves differently so stays separate.

Review

Spec review: skipped. Code review: skipped. Claims review: skipped.

No blind reviews were run on this PR. It changes tests only.

Written by an agent.

Haiku scanned all 404 test files; Sonnet verified each removal against the kept test that proves the same claim, then applied deletes, merges and tables.
@V3RON
V3RON marked this pull request as ready for review October 21, 2026 18:11
Slow (120 s budget) and flaky (#807); edge.test.ts and download-cap.test.ts prove the 2 GiB limit.
@V3RON V3RON changed the title test(audit): remove low-value tests across the suite, 138 fewer tests test(audit): remove low-value tests across the suite, 140 fewer tests Oct 21, 2026
@V3RON
V3RON merged commit 19a11eb into main Oct 21, 2026
34 of 35 checks passed
@V3RON
V3RON deleted the chore/test-roi-cleanup branch October 21, 2026 18:27
V3RON added a commit that referenced this pull request Oct 25, 2026
… GiB (#988)

Closes #807

### Status
Implement: done (1/1 green) Review: round 1, 0 blocking Hardware: n/a
Gate: running
Next: gate

- [x] The download-limit test asserts the agent's response errors, never
ends cleanly and never delivers more than 2147483648 bytes, with no "at
least 2 GiB delivered" assertion (edge.test.ts, the "passes 2147483648
bytes" test). Checked: the audit and the code review each let every byte
through in host.ts and the new `<= 2147483648` assertion failed
(2147483649 delivered); deleting the reader cancel failed the cancel
assertion.

## Assumptions
- Assumption: the gateway-front.test.ts test named in the issue no
longer exists (removed in #849), and edge.test.ts's equivalent had no
lower-bound assertion, so I added the upper-bound assertion the Decision
names.

## Review

Spec review: 0 blocking, 0 fixed, 1 notes. Code review: 0 blocking, 0
fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 24.2M.
Runs: 6. Cost USD: 0.9235. Agent seconds: 523.
Assessment: complete

*Written by an agent.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant